import axios from 'axios';

const instance = axios.create({
  baseURL: '/api/', // 使用mock
  headers: { 'Content-Type': 'application/json', "Accept": "application/json, text/plain, application/x-www-form-urlencoded", }
})

instance.interceptors.request.use(
  config => {
    return config
  }, error => {
    return Promise.reject(error)
  })

instance.interceptors.response.use(
  response => {
    return response
  }, error => {
    return Promise.reject(error.response.data)
  })
export default instance